package com.scs.application.modules.wm.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "唯一码外部记录，spdAms.printRFID 创建")
@TableName("wm_order_barcodeout")
@AllArgsConstructor
@NoArgsConstructor
@EntityIndexAnnotation(ux={"rfid"})
public class OrderBarcodeout extends SimpleDataEntity {

    @EntityFieldAnnotation(
            text = "业务单号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "对方系统的业务单号"
    )
    private String busKey;


    @EntityFieldAnnotation(
            text = "物料名称",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "物料品规",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;


    @EntityFieldAnnotation(
            text = "厂商",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String mfgName;


    @EntityFieldAnnotation(
            text = "批次",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String lot;

    @EntityFieldAnnotation(
            text = "效期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String expDate;

    @EntityFieldAnnotation(
            text = "定数系数",
            length = "16",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String packageQty;

    @EntityFieldAnnotation(
            text = "定数单位",
            length = "10",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "科室名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptName;


    @EntityFieldAnnotation(
            text = "补货单单号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String procurementCode;

    @EntityFieldAnnotation(
            text = "",
            length = "32",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String rfid;

    @EntityFieldAnnotation(
            text = "最近打印时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    public Date printTime;

    @EntityFieldAnnotation(
            text = "是否打印",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "是否打印"
    )
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    public Boolean flagPrint;

    @EntityFieldAnnotation(
            text = "标签类型",
            length = "10",
            not_null = false,
            default_value = "type1",
            comment = "type1:普通标签，type2：抗金属标签"
    )
    private String labelType;

}
